#!/bin/bash
Get OS version
os_version=$(cat  /etc/centos-release | awk '{print $3}'| cut -d"." -f1)
read -p "please input your computer archtye,i386\x86_64\i586:" arch
#Download the epel source
url=http://download.fedoraproject.org/pub/epel/${os_version}/${arch}/epel-release-6-8.noarch.rpm
wget ${url}
#Install epel
rpm -ivh epel-release*
yum repolist
rm -f epel-release*
